'''
Created on 2010-7-4

@author: me
'''
class Person:
    def __init__(self, name):
        self.name = name
    def sayHi(self):
        print 'Hello, my name is', self.name

p = Person('Swaroop')
p.sayHi()


def f1(self, x, y):
    return min(x, x+y)

class C:
    f = f1
    def g(self):
        return 'hello world'
    h = g

x = C()
print x.f(3,4)
print x.h() 
print x.h
print id(C)
print id(x)
# This short example can also be written as Person('Swaroop').sayHi() 

class Employee:
    pass

john = Employee() # Create an empty employee record

# Fill the fields of the record
john.name = 'John Doe'
john.dept = 'computer lab'
john.salary = 1000

print john.dept
